package org.zoomdev.zoom.timer.modules;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.zoomdev.zoom.timer.TimerJob;

final class WaitExistsStrategy implements TimerJob {
    private static final Logger log = LoggerFactory.getLogger(CoreTimerModule.NAME);
    private final TimerJob job;

    public WaitExistsStrategy(TimerJob job) {
        this.job = job;
    }


    @Override
    public void execute() throws Throwable {
        //直接启用锁
        synchronized (job) {
            job.execute();
        }
    }
}
